package com.xu.tools.config.mq;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author xuguan
 * @date 2023/4/9
 * @desc 消息转换器配置
 */
@Configuration
public class MqMessageConverterConfig {
    @Bean
    MessageConverter messageConverter() {
        // 使用Json序列化消息转换器
        return new Jackson2JsonMessageConverter();
    }
}
